/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 *
 */

import { sendSocketRequest, MessageType, SocketRequest } from '../java-daemon/websocket.js';

export interface PackParams {
  command: string[];
}

export async function sendPackRequest(packToolJarPath: string, packParams: PackParams) {
  const packRequest: SocketRequest = {
    type: MessageType.PACK_APP,
    data: JSON.stringify(packParams),
  };
  return sendSocketRequest(packRequest, packToolJarPath);
}
